<template>
Zi3组件 <br>
  <button @click="save">存入数据</button>
  <hr>
</template>

<script setup >
const save = () => {
  sessionStorage.setItem('user', JSON.stringify({id:1,userName:'张三',age:18}))
}

</script>

<style scoped>

</style>